<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<script>
    function match() {
        var num1 = parseFloat(prompt('请输入第一个数'));
        var num2 = parseFloat(prompt('请输入第二个数'));
        var sum = 0;
        sum = num1 + num2;
        alert(sum);
    }
    match();
</script>
<body>

</body>
</html>